using System;
using System.Collections.Generic;
using MediatR;

namespace Agriculture.Api.Read.Application.Command
{
    /// <summary>
    /// 挂号订单详情查询命令
    /// </summary>
    public class RegistrationOrderDetailQuery : IRequest<RegistrationOrderDetailResult>
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }
    }

    /// <summary>
    /// 挂号订单详情结果
    /// </summary>
    public class RegistrationOrderDetailResult
    {
        /// <summary>
        /// 挂号信息
        /// </summary>
        public RegistrationInfoDto RegistrationInfo { get; set; } = new RegistrationInfoDto();

        /// <summary>
        /// 订单信息
        /// </summary>
        public OrderInfoDto OrderInfo { get; set; } = new OrderInfoDto();

        /// <summary>
        /// 就诊人信息
        /// </summary>
        public RegistrationPatientInfoDto PatientInfo { get; set; } = new RegistrationPatientInfoDto();
    }

    /// <summary>
    /// 挂号信息DTO
    /// </summary>
    public class RegistrationInfoDto
    {
        /// <summary>
        /// 就诊时间
        /// </summary>
        public DateTime AppointmentTime { get; set; }

        /// <summary>
        /// 就诊医院
        /// </summary>
        public string Hospital { get; set; }

        /// <summary>
        /// 科室
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 医生
        /// </summary>
        public string Doctor { get; set; }

        /// <summary>
        /// 医生职称
        /// </summary>
        public string DoctorTitle { get; set; }

        /// <summary>
        /// 医事服务费
        /// </summary>
        public decimal RegistrationFee { get; set; }

        /// <summary>
        /// 挂号单号
        /// </summary>
        public string RegistrationNo { get; set; }
    }

    /// <summary>
    /// 订单信息DTO
    /// </summary>
    public class OrderInfoDto
    {
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// 应付金额
        /// </summary>
        public decimal PayableAmount { get; set; }

        /// <summary>
        /// 优惠券
        /// </summary>
        public decimal CouponAmount { get; set; }

        /// <summary>
        /// 实际支付
        /// </summary>
        public decimal ActualPayment { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 支付方式
        /// </summary>
        public string PaymentMethod { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTime? PaymentTime { get; set; }

        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal? RefundAmount { get; set; }

        /// <summary>
        /// 退款时间
        /// </summary>
        public DateTime? RefundTime { get; set; }
    }

    /// <summary>
    /// 就诊人信息DTO
    /// </summary>
    public class RegistrationPatientInfoDto
    {
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public string Gender { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        public string Phone { get; set; }
    }
} 